<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});
Route::group(
    ['middleware' => 'Head'], function () {
    Route::post('members/create', 'Api\MembersController@store');
    Route::post('members/update', 'Api\MembersController@update');
    Route::get('members', 'Api\MembersController@findMan');
    Route::get('scores', 'Api\ScoresController@findLog');
    Route::post('scores/create', 'Api\ScoresController@store');
    Route::get('branches', 'Api\BranchController@findBranch');
    Route::get('tasks', 'Api\BranchController@task');
    Route::get('grades/score', 'Api\BranchController@score');
});

